/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pro.unal.edu.sink.write;

import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import pro.unal.edu.datasource.MyImage;

/**
 * @author Carlos Eduardo Bernal Cárdenas
 * @version 1.0
 * @created 30-ago-2011
 */
public class ImageWriter {

    private String nameImage;
    private MyImage image;

    public ImageWriter(String nameImage, MyImage image) {
        this.nameImage = nameImage;
        this.image = image;
        writeImage();
    }

    private void writeImage() {
        if (image.getType().equalsIgnoreCase("BM")) {
            BMPWriter.save(nameImage, image);
        }
    }
}
